package com.mjh.zhujianju.util;

import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: Alex
 * @version: V1.0
 * @project: zhujianju
 * @package: com.mjh.zhujianju.util
 * @description: description
 * @date: 2018/9/7
 * @time: 上午9:45
 */
public class FileUrlAdapter {

	public static String assemblyAction(Long id){
		if(id == null){
			return null;
		}
		return "/file/showImage/" + id;
	}

	public static List<String> assemblyAction(List<Long> ids){
		if(CollectionUtils.isEmpty(ids)){
			return null;
		}
		List<String> stringList = new ArrayList<String>();
		for(Long id : ids){
			stringList.add("/file/showImage/" + id);
		}
		return stringList;
	}
}
